Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Belos: Adds more unpreconditioned Tpetra tests #9163

Merged
merged 1 commit into from
May 24, 2021

Conversation

hkthorn
Copy link
Contributor

@hkthorn hkthorn commented May 21, 2021

@trilinos/belos

Motivation

This commit translates more of the Epetra-based tests to Tpetra
linear algebra.

  1. The Tpetra solver factory test was extended to include all of
    the linear solvers that are accessible through the Belos linear
    solver factory. This resulted in the detection of a bug in the
    test that was causing solver failures, which has been addressed.

  2. Adds diagonal test to MINRES and TFQMR solvers for Epetra.
    The extension of the Tpetra solver factory test illustrated a
    problem in the MINRES solver for diagonal/identity matrices,
    which has been addressed in this commit.

  3. Adds BiCGStab, RCG and TFQMR test to Tpetra-based linear
    algebra. Testing for these solvers has been absent before the
    extention to the Tpetra solver factory and the addition of these
    tests.

Stakeholder Feedback

Testing

OSX GCC10.x serial

This commit translates more of the Epetra-based tests to Tpetra
linear algebra.

1)  The Tpetra solver factory test was extended to include all of
the linear solvers that are accessible through the Belos linear
solver factory.  This resulted in the detection of a bug in the
test that was causing solver failures, which has been addressed.

2)  Adds diagonal test to MINRES and TFQMR solvers for Epetra.
The extension of the Tpetra solver factory test illustrated a
problem in the MINRES solver for diagonal/identity matrices,
which has been addressed in this commit.

3)  Adds BiCGStab, RCG and TFQMR test to Tpetra-based linear
algebra.  Testing for these solvers has been absent before the
extention to the Tpetra solver factory and the addition of these
tests.
@hkthorn hkthorn added type: enhancement Issue is an enhancement, not a bug pkg: Belos labels May 21, 2021
@hkthorn hkthorn requested review from cgcgcg and jennloe May 21, 2021 21:31
@hkthorn hkthorn self-assigned this May 21, 2021
@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_8.3.0

  • Build Num: 4485
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_serial

  • Build Num: 2016
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_debug

  • Build Num: 2497
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 9829
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_cuda_10.1.105

  • Build Num: 1244
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_clang_10.0.0

  • Build Num: 2609
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_cuda_10.1.105_uvm_off

  • Build Num: 241
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
PULLREQUEST_CDASH_TRACK Experimental
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_python_3

  • Build Num: 5191
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Using Repos:

Repo: TRILINOS (hkthorn/Trilinos)
  • Branch: develop
  • SHA: 06042f3
  • Mode: TEST_REPO

Pull Request Author: hkthorn

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_8.3.0

  • Build Num: 4485
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_serial

  • Build Num: 2016
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_debug

  • Build Num: 2497
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 9829
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_cuda_10.1.105

  • Build Num: 1244
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_clang_10.0.0

  • Build Num: 2609
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_cuda_10.1.105_uvm_off

  • Build Num: 241
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
PULLREQUEST_CDASH_TRACK Experimental
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389

Build Information

Test Name: Trilinos_pullrequest_python_3

  • Build Num: 5191
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS pkg: Belos;type: enhancement
PULLREQUESTNUM 9163
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH develop
TRILINOS_SOURCE_REPO https://github.com/hkthorn/Trilinos
TRILINOS_SOURCE_SHA 06042f3
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA e221389


CDash Test Results for PR# 9163.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO REVIEWS HAVE BEEN PERFORMED ON THIS PULL REQUEST!

@trilinos-autotester
Copy link
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

2 similar comments
@trilinos-autotester
Copy link
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@trilinos-autotester
Copy link
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@@ -592,8 +594,8 @@ class MinresIter : virtual public MinresIteration<ScalarType,MV,OP> {

// Update x:
// x = x + phi*w;
MVT::MvAddMv( one, *cur_soln_vec, phi, *W_, *cur_soln_vec );
lp_->updateSolution();
//MVT::MvAddMv( one, *cur_soln_vec, phi, *W_, *cur_soln_vec );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented line, add comment that updateSolution does this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can add that when I fix the solver for right-preconditioning.

Comment on lines -313 to -317

# ifdef BELOS_TEUCHOS_TIME_MONITOR
Teuchos::TimeMonitor::summarize (verbOut);
# endif // BELOS_TEUCHOS_TIME_MONITOR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timer summary is requested by the solver, so a second timer summary is not necessary.

try {
solver->solve ();
} catch (std::exception& e) {
out << "*** FAILED: Belos::SolverFactory::solve threw an exception: "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SolverManager::solve?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a try/catch loop around the solve because the test was not catching solver failures. This was useful for debugging the test and solvers that were having issues with identity matrices.

Copy link
Contributor

@jennloe jennloe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tiny change in BelosMinresIter.hpp on line 405, but this can be fixed in a separate commit. I don't think that makes any practical difference.

@@ -403,12 +403,13 @@ class MinresIter : virtual public MinresIteration<ScalarType,MV,OP> {
// Create convenience variables for zero, one.
const ScalarType one = SCT::one();
const MagnitudeType zero = SMT::zero();
const MagnitudeType m_zero = SMT::zero();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the m_zero here different from zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a zero for the magnitude type. It's easier to identify the difference between the scalar type zero and magnitude type zero by using the "m_" prefix. It is not used consistently throughout the code, but it helps with clarity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you notice that the 'zero' above here is also a magnitude type?

@jennloe
Copy link
Contributor

jennloe commented May 24, 2021

As a side note- It would be nice to add a Tpetra test or two that uses a Matrix Market file. When I play with them, I always get annoyed that our Tpetra tests default to only .hb files, and then I have to put in the Matrix Market reader manually. :)

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ jennloe ]!

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - AutoMerge IS ENABLED, but the Label AT: AUTOMERGE is not set. Either set Label AT: AUTOMERGE or manually merge the PR...

@hkthorn hkthorn merged commit 1d14031 into trilinos:develop May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Belos type: enhancement Issue is an enhancement, not a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants